#include "RoomElement.hpp"

RoomElement::RoomElement(int roomNumber, const b2Vec2* vertices, int numberOfVertices, b2World* world) {
    this->roomNumber = roomNumber;

    // Creating body.
    b2BodyDef bodyDefinition;
    bodyDefinition.userData = this;
    bodyDefinition.position.Set(0.0f, 0.0f);

    b2ChainShape shape;
    shape.CreateLoop(vertices, numberOfVertices);

    this->body = world->CreateBody(&bodyDefinition);
    this->body->CreateFixture(&shape, 0.0f);
}

bool RoomElement::isRoom() {
    return true;
}
